import { Switch, withRouter, Route } from "react-router-dom";
import React, { Component } from 'react';

import Home from '@/views/index/index';
import { notFound } from '@/views/notFound';
import { Layout } from './Layout';
import asyncRouters from './async';

class SwitchRoute extends Component{
  render() {
    return (
      <Switch>
        <Route path='/404' exact component={notFound} />
        <Route path="/" exact component={Home} />
        <Layout config={asyncRouters} />
      </Switch>
    )
  }
}
export default withRouter(SwitchRoute)